package com.gzk.oeno.ihm.vin;

import com.gzk.oeno.business.vin.Vin;
import com.gzk.oeno.ihm.vin.form.VinForm;
import com.gzk.oeno.tech.ui.IdInternalFrame;
import com.gzk.utils.ihm.UIUtils;

public class SingleVinIFrame extends IdInternalFrame{

	private final Vin vin;
	
	public SingleVinIFrame(Vin vin){
		super(vin.getFriendlyName(), true, true, true, true);
		this.vin = vin;
		
		setFrameIcon(UIUtils.loadSilentIcon("icons/wine_16.png"));
		
		VinForm form = new VinForm();
		form.setEditableObject(vin);
		form.modifyOptions(true, true);
		setContentPane(form);
	}
	
	
	@Override
	public String getId() {
		return "Vin@"+vin.getId();
	}

}
